package com.web.service.impl;


import com.web.dao.UserDAO;
import com.web.dao.impl.UserDAOimpl;
import com.web.entity.User;
import com.web.service.UserService;

public class UserServiceimpl implements UserService {
    private UserDAO userDAO = new UserDAOimpl();
    @Override
    public User login(String username, String password) {
        User user = userDAO.selectUserByUsername(username);
        if(user != null){
            if(password.equals(user.getPassword())){
                return user;
            }
        }
        return null;
    }
}
